 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>CSS Tables</title> 
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.6.min.js"></script>
<link href="__PUBLIC__/css/finance.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript">
function delF(id){
	$.ajax({
			type:"POST",
            url:"__APP__/finance/delF",
            data:{'id':id},
			datatype:'html',
            error: function(msg){
				alert(msg);
			},
            success:function(msg){
            	$('#tr_'+id).remove();
            }	
	});
}

function changeF(id){
	$.ajax({
			type:"POST",
            url:"__APP__/finance/changeF",
            data:{'id':id},
			datatype:'html',
            error: function(msg){
				alert(msg);
			},
            success:function(msg){
				$("#change"+id).remove();
				$("#deleteF"+id).remove();
				$("#historyF"+id).html("历史记录");
            	alert(msg);
            }	
	});
}

</script>
</head> 

<body>
 
<table id="mytable" cellspacing="0" width="100%" summary="应收款项管理"> 
<caption> </caption> 
  <tr> 
    <th width="14%" scope="col" abbr="Configurations">录入日期/修改日期</th> 
	<th width="8%" scope="col" abbr="Dual 2">状态</th> 
    <th width="14%" scope="col" abbr="Dual 1.8">单位名称</th> 
    <th width="14%" scope="col" abbr="Dual 2">事由</th> 
    <th width="8%" scope="col" abbr="Dual 2.5">金额</th> 
    <th width="10%" scope="col" abbr="Configurations">应收/付日期</th> 
    <th width="20%" scope="col" abbr="Dual 1.8">备注</th>     
    <th width="12%" scope="col" abbr="Dual 2.5">操作</th>
  </tr> 
  <?php if(is_array($resultInfo)) foreach( $resultInfo as $vo ) {?>
  <tr id="tr_{$vo['id']}"> 
    <td <?php if($key%2!=0) echo "class='alt'";?>>{$vo['insertTime']}/{$vo['updateTime']}</td>
    <td <?php if($key%2!=0) echo "class='alt'";?>>{$vo['statusInfo']}</td> 
    <td <?php if($key%2!=0) echo "class='alt'";?>>{$vo['unitName']}</td> 

    <td <?php if($key%2!=0) echo "class='alt'";?> >{$vo['explainInfo']}</td> 
    <td <?php if($key%2!=0) echo "class='alt'";?> >{$vo['sumInfo']}</td> 
    <td <?php if($key%2!=0) echo "class='alt'";?> >{$vo['shouldTime']}</td> 
    <td <?php if($key%2!=0) echo "class='alt'";?> >{$vo['remarks']}</td>    
    <td <?php if($key%2!=0) echo "class='alt'";?> >
    <?php if($vo['history']!=1){  ?>
    <a id="change{$vo['id']}" href="__URL__/changFinance?id={$vo['id']}" target="_self" style=" text-decoration:none; color:#03515d; font-size:12px;">修改/</a><span id="deleteF{$vo['id']}" onclick="delF({$vo['id']});" style="text-decoration:none; color:#03515d; font-size:12px;cursor:pointer; cursor:hand;">删除/</span>
    
    <span style="text-decoration:none; color:#03515d; font-size:12px;cursor:pointer; cursor:hand;" id="historyF{$vo['id']}" onclick="changeF({$vo['id']});" >生成历史</span></td>
    <?php }else{ echo "<span style='color:#03515d; font-size:12px;'>历史记录</span>";}?> 
  </tr> 
  
  <?php $key++; }  ?>
  <tr>
  	<table width="100%" border="1">
      <tr>
        <th scope="col" class="alt" style="background-color:#FFF; ">共有 {$count} 条记录&nbsp;&nbsp;&nbsp;{$page}&nbsp;&nbsp;</th>
      </tr>
	</table>


  </tr>
</table> 

</body> 
</html>